package com.lk.springboot.demo.springbootdemo01.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author kexl
 * @Title: spring-boot-demo
 * @Package com.lk.springboot.demo.springbootdemo01.controller
 * @Description:spring boot 控制层demo
 * @date 2018/7/10 14:16
 */
@Controller
public class HelloController {

	@RequestMapping("index")
	public String index(Model model){
		model.addAttribute("name","jsp您好！");
		return "index";
	}

	@RequestMapping("hello")
	@ResponseBody
	public String hello(){
		return "hello spring boot!";
	}
}
